A Three-Valued Declarative Debugging Scheme
نویسنده
چکیده
Declarative debugging has many advantages over conventional approaches to de-bugging for logic and functional programs. This paper extends a previously deened scheme for declarative debugging in which computations were considered either correct or erroneous. We argue that a third value, \inadmissible", should be supported and show how this can be done. Two classes of bugs are deened: one equivalent to the bugs deened by the two valued scheme, the other associated with inadmissibility. It is shown how diierent instances of the scheme can be used to diagnose type errors, mode errors, violated assertions and abnormal termination as well as the more familiar classes of bugs detected by declarative debuggers. Consequences for the semantics of logic programs and how type schemes can be reconstructed using three valued logic are brieey addressed.
منابع مشابه
Debugging techniques for declarative languages: Profiling, program slicing and algorithmic debugging
The task of debugging can be arduous. A bug can be evident with a single glance, or it can be hidden in the deepest lurking place of our program. Nevertheless, surprisingly, debugging is one of the software processes that has been mostly abandoned by the scientific community, and the same debugging techniques used twenty years ago are still being used today. The situation is not different regar...
متن کاملA Declarative Debugging Scheme
We present a very simple but flexible declarative debugging scheme. A Abstract-1 declarative debugger can be defined in Prolog with a single clause, and relies on the definition of just two additional predicates. With suitable definitions of these predicates, the debugger can diagnose several classes of bugs in many languages. We give examples of diagnoses of wrong answers in functional, relati...
متن کاملTruth versus information in logic programming
The semantics of logic programs was originally described in terms of two-valued logic. Soon, however, it was realised that three-valued logic had some natural advantages, as it provides distinct values not only for truth and falsehood, but also for “undefined”. The three-valued semantics proposed by Fitting and by Kunen are closely related to what is computed by a logic program, the third truth...
متن کاملA Debugging Scheme for Declarative Equation Based Modeling Languages
This paper concerns the static analysis for debugging purposes of programs written in declarative equation based modeling languages. We first give an introduction to declarative equation based languages and the consequences equation based programming has for debugging. At the same time, we examine the particular debugging problems posed by Modelica, a declarative equation based modeling languag...
متن کاملA Three-Valued Semantic for Horn Clause Programs
The study of semantics of logic programs has shown strong links between the model theoretic semantics (truth and falsity of atoms in the programmer's interpretation of a program), procedural semantics (for example, SLD resolution) and xpoint semantics (which is useful for program analysis and alternative execution mechanisms). Nearly all of this work assumes that intended interpretations are tw...
متن کامل